package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import model.AppModel;
import view.AppView;

public abstract class AbstractActionListener implements ActionListener {

	protected AppModel model;
	protected AppView view;

	public AbstractActionListener(AppView view)
	{
		this.view = view;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		myAction();
	}

	protected abstract void myAction();
	
	protected void refresh()
	{
		this.view.update(model);
	}

	public void update(AppModel model)
	{
		this.model = model;
	}
}